﻿function GameEventListenerList() {

    this.listeners = [];

    this.addListener = function (listener) {
        this.listeners.push(listener);
    }

    this.onAction = function (time, action, mc) {
        for (i = 0; i < this.listeners.length; i++) {
            this.listeners[i].onAction(time, action, mc);
        }
    }

    this.onSpaceshipFreeze = function (time, freezeDuration) {
        for (i = 0; i < this.listeners.length; i++) {
            this.listeners[i].onSpaceshipFreeze(time, freezeDuration);
        }
    }

    this.onRefuel = function (time, refuelCost) {
        for (i = 0; i < this.listeners.length; i++) {
            this.listeners[i].onRefuel(time, refuelCost);
        }
    }

   

}